#define _CRT_SECURE_NO_WARNINGS 1 

#include<iostream>
#include<string>
#include<vector>

using namespace std;

int main()
{
    string num1, num2;
    cin >> num1 >> num2;
    //if (num1 == "0") return num2;
    //if (num2 == "0") return num1;
    vector<int> n1, n2, sum;
    for (int i = num1.size() - 1; i >= 0; i--) n1.push_back(num1[i] - '0');
    for (int i = num2.size() - 1; i >= 0; i--) n2.push_back(num2[i] - '0');
    int tmp = 0;
    for (int i = 0; i < n1.size() || i < n2.size(); i++)
    {
        if (i < n1.size()) tmp += n1[i];
        if (i < n2.size()) tmp += n2[i];
        sum.push_back(tmp % 10);
        tmp /= 10;
    }
    if (tmp) sum.push_back(1);
    string s;
    for (int i = sum.size() - 1; i >= 0; i--)
        s += (sum[i] + '0');
    cout << s;
    return 0;
}